package nl.boelen.game.screen.menubutton;

import nl.boelen.game.Game;
import nl.boelen.game.enums.GameState;

public class QuitButton extends MenuButton {
    /**
     * @uml.property name="game"
     * @uml.associationEnd multiplicity="(1 1)"
     */
    private Game game;

    public QuitButton(Game game, String text) {
        super(text);
        this.game = game;
    }

    @Override
    public void setVisibility(GameState gameState) {
        setVisible(true);
    }

    @Override
    public void pressedButton() {
        game.quit();
    }

}
